import Vue from 'vue'
import Router from 'vue-router'
import index from '../views/index'
import home from '../components/home.vue'
import allList from '../components/productlist.vue'
import details from'../views/product'
Vue.use(Router)

export default new Router({
  routes: [{
    path: '/',
    name: 'index',
    component: index,
    children: [{
        path: '/',
        name: 'home',
        component: home
      },
      {
        path: '/allList',
        name: 'allList',
        component: allList
      }

    ]
  },
  {
    path: '/details',
    name: 'details',
    component:details
  }]
})
